<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js的使用</title>
    <script>
        // alert("ok")
        // console.log("ok")
        window.onload = function (){
            var box = document.querySelector(".box");
            box.innerText = "老师你好"
        }
    </script>
    <!--<script src="test.js"></script>-->
</head>
<body>
    <div class="box">同学你好</div>
    <script>
        // alert("ok")
        // console.log("ok")
         var box = document.querySelector(".box");
         box.innerText = "老师你好"
    </script>
    <!--<script src="test.js"></script>-->
</body>
</html>